//
// Created by Castle on 2025/10/27.
//

#include <iostream>
using namespace std;

int main() {
    int n,m;
    cin >> n >> m;
    cout << n / m << " " << n % m << endl;

    return 0;
}